home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / textfile / faqs / comp_faq / part1 next >
Encoding:
Internet Message Format  |  1992-12-26  |  73.7 KB

  1. Xref: bloom-picayune.mit.edu comp.compression:5212 news.answers:4231
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!caen!uunet!mcsun!julienas!chorus!chorus.fr
  3. From: jloup@chorus.fr (Jean-loup Gailly)
  4. Newsgroups: comp.compression,news.answers
  5. Subject: comp.compression Frequently Asked Questions (part 1/2)
  6. Summary: *** READ THIS BEFORE POSTING ***
  7. Keywords: data compression, FAQ
  8. Message-ID: <compr1_27nov92@chorus.fr>
  9. Date: 27 Nov 92 14:55:40 GMT
  10. Expires: 10 Jan 93 16:17:20 GMT
  11. Sender: news@chorus.chorus.fr
  12. Reply-To: jloup@chorus.fr
  13. Followup-To: comp.compression
  14. Lines: 1762
  15. Approved: news-answers-request@MIT.Edu
  16. Supersedes: <compr1_29oct92@chorus.fr>
  17.  
  18. Archive-name: compression-faq/part1
  19. Last-modified: Nov 27th, 1992
  20.  
  21.         "I've already explained this once, but repetition is
  22.         the very soul of the net."        (from alt.config)
  23.  
  24. This file is part 1 of a set of Frequently Asked Questions (FAQ) for
  25. the groups comp.compression and comp.compression.research.  Certain
  26. questions get asked time and again, and this is an attempt to reduce
  27. the bandwidth taken up by these posts and their associated replies.
  28. If you have a question, *please* check this file before you post.  It
  29. may save a lot of peoples time.
  30.  
  31. If you have not already read the overall Usenet introductory material
  32. posted to "news.announce.newusers", please do.
  33.  
  34. If you don't want to see this FAQ regularly, please add the
  35. subject line to your kill file. If you have corrections or suggestions
  36. for this FAQ, send them to Jean-loup Gailly <jloup@chorus.fr>.
  37. Thank you.
  38.  
  39. Part 1 is oriented towards practical usage of compression programs.
  40. Part 2 is more intended for people who want to know how compression works.
  41.  
  42. Main changes relative to the previous version: 
  43.  
  44. - added pointer to lossless compression sources, lds_10.zip (item 2)
  45. - added pointers to Amiga archivers (item 2)
  46. - shortened a bit the WEB story (item 9)
  47. - added reference for the V.42bis standard (item 11)
  48. - added one pointer for arithmetic compression code (item 13)
  49. - added reference for book on JPEG (item 19)
  50. - added pointer to sources for fractal compression (item 17)
  51. - added info on MPEG audio compression (item 26)
  52.  
  53.  
  54. Contents
  55. ========
  56.  
  57. General questions:
  58.  
  59. [1]  What are these newsgroups about?
  60. [2]  What is this .xxx file type?
  61.      Where can I find the corresponding compression program?
  62. [3]  What is the latest pkzip version?
  63. [4]  What is an archiver?
  64. [5]  What is the best general purpose compression program?
  65. [7]  Which books should I read?
  66. [8]  What about patents on data compression algorithms?
  67. [9]  The WEB 16:1 compressor.
  68. [11] What is the V.42bis standard?
  69. [12] I need source for the winners of the Dr Dobbs compression contest
  70. [13] I need source for arithmetic coding
  71.  
  72. Image and audio compression:
  73.  
  74. [15] Where can I get image compression programs?
  75. [16] What is the state of the art in lossless image compression?
  76. [17] What is the state of fractal compression?
  77. [18] I need specs and source for TIFF and CCITT group 4 Fax.
  78. [19] What is JPEG?
  79. [20] I am looking for source of an H.261 codec.
  80. [25] Fast DCT (Discrete Cosine Transform) algorithms
  81. [26] Are there algorithms and standards for audio compression?
  82.  
  83. Common problems:
  84.  
  85. [30] My archive is corrupted!
  86. [31] pkunzip reports a CRC error!
  87. [32] VMS zip is not compatible with pkzip!
  88.  
  89. Questions which do not really belong to comp.compression:
  90.  
  91. [50] What is this 'tar' compression program?
  92. [51] I need a CRC algorithm
  93. [52] What about those people who continue to ask frequently asked questions?
  94. [53] Where are FAQ lists archived?
  95. [54] I need specs for graphics formats
  96. [55] Where can I find Lenna and other images?
  97. [56] I am looking for a message digest algorithm
  98.  
  99.  
  100. (Long) introductions to data compression techniques (in part 2)
  101.  
  102. [70] Introduction to data compression (long)
  103.        Huffman and Related Compression Techniques
  104.        Arithmetic Coding
  105.        Substitutional Compressors
  106.           The LZ78 family of compressors
  107.           The LZ77 family of compressors
  108.  
  109. [71] Introduction to MPEG (long)
  110.        What is MPEG?
  111.        Does it have anything to do with JPEG?
  112.        Then what's JBIG and MHEG?
  113.        What has MPEG accomplished?
  114.        So how does MPEG I work?
  115.        What about the audio compression?
  116.        So how much does it compress?
  117.        What's phase II?
  118.        When will all this be finished?
  119.        How do I join MPEG?
  120.        How do I get the documents, like the MPEG I draft?
  121.  
  122. [72] What is wavelet theory?
  123. [73] What is the theoretical compression limit?
  124. [74] Introduction to JBIG
  125.  
  126. [99] Acknowledgments
  127.  
  128. Search for "Subject: [#]" to get to question number # quickly. Some news
  129. readers can also take advantage of the message digest format used here.
  130.  
  131. If you know very little about data compression, read question 70 in
  132. part 2 first.
  133.  
  134. ------------------------------------------------------------------------------
  135.  
  136. Subject: [1] What are these newsgroups about?
  137.  
  138.  
  139. comp.compression is the place to discuss about data compression, both
  140. lossless (for text or data) and lossy (for images, sound, etc..).
  141. comp.compression.research was created later to provide a forum for
  142. current research on data compression and data compression algorithms.
  143. If you are not experienced in data compression, please post in
  144. comp.compression only.
  145.  
  146. If you only want to find a particular compression program for a
  147. particular operating system, please read first this FAQ and the
  148. article "How to find sources" which is regularly posted in
  149. news.answers.
  150.  
  151. If you can't resist posting such a request, other groups are probably
  152. more appropriate (comp.binaries.ibm.pc.wanted, comp.sources.wanted,
  153. comp.sys.mac.wanted, alt.graphics.pixutils). Please post your request
  154. in comp.compression only as a last resource.
  155.  
  156. Please do not post any program in binary form to comp.compression.
  157. Very short sources can be posted, but long sources should be be posted
  158. to the specialized source groups, such as comp.sources.* or alt.sources.
  159.  
  160. As for any newsgroups, do not post the same message separately to
  161. comp.compression and comp.compression.research.
  162.  
  163. ------------------------------------------------------------------------------
  164.  
  165. Subject: [2] What is this .xxx file type?
  166.              Where can I find the corresponding compression program?
  167.  
  168.  
  169. All the programs mentioned in this section are lossless.
  170. For most programs, one US and one European ftp site are given.
  171. (wuarchive.wustl.edu: 128.152.135.4, garbo.uwasa.fi: 128.214.87.1)
  172. Many other sites (in particular wsmr-simtel20.army.mil: 192.88.110.2)
  173. have the same programs.
  174.  
  175. To keep this list to a reasonable size, many programs are not
  176. mentioned here. Additional information can be found in the file
  177. ux1.cso.uiuc.edu:/doc/pcnet/compression [128.174.5.59] maintained by
  178. David Lemson (lemson@uiuc.edu). When several programs can handle
  179. the same archive format, only one of them is given. Sources for
  180. additional lossless data compressors can be found in
  181. garbo.uwasa.fi:/pc/programming/lds_10.zip.
  182.  
  183. For Macintosh programs, look on sumex-aim.stanford.edu:/info-mac [36.44.0.6].
  184. For VM/CMS, look on vmd.cso.uiuc.edu:/public.477 [128.174.5.98].
  185. For Atari, look on terminator.cc.umich.edu:/atari/archivers [141.211.164.8]
  186. For Amiga, look on ux1.cso.uiuc.edu:/pub/amiga [128.174.5.59]
  187.     
  188. If you don't know how to use ftp or don't have ftp access, read the
  189. article "How to find sources" which is regularly posted in news.answers.
  190.  
  191. If you can't find a program given below, it is likely that a newer
  192. version exists in the same directory. (Tell me <jloup@chorus.fr>)
  193.  
  194. A very short description of the compression algorithm is given for
  195. most programs. For the meaning of LZ77, LZ78 and LZW, see question 
  196. 70 in part 2 of the FAQ.)
  197.  
  198. ext:  produced by or read by
  199.  
  200. .arc: arc, pkarc for MSDOS. (LZW algorithm)
  201.     wuarchive.wustl.edu:/mirrors/msdos/starter/pk361.exe
  202.     garbo.uwasa.fi:/pc/arcers/pk361.exe
  203.  
  204.       arc for Unix
  205.         wuarchive.wustl.edu:/mirrors/misc/unix/arc521e.tar-z
  206.     garbo.uwasa.fi:/unix/arcers/arc.tar.Z
  207.         Contact: Howard Chu <hyc@umix.cc.umich.edu>
  208.  
  209.       arc for VMS
  210.     wuarchive.wustl.edu:/packages/compression/vax-vms/arc.exe
  211.  
  212.       arcmac for Mac
  213.     mac.archive.umich.edu:/mac/utilities/compressionapps/arcmac.hqx
  214.  
  215.       arc for Amiga
  216.     ftp.funet.fi:pub/amiga/fish/001-100/ff070/arc.lha
  217.  
  218. .arj: arj for MSDOS (LZ77 with hashing, plus secondary static Huffman
  219.           encoding on a block basis)
  220.         Contact: Robert K Jung <robjung@world.std.com>
  221.         wuarchive.wustl.edu:/mirrors/msdos/arc-lbr/arj230.exe
  222.     garbo.uwasa.fi:/pc/arcers/arj230ng.exe
  223.  
  224.       unarj for Unix. Decompresses only. (There is no arj compressor for Unix.
  225.         Don't post a request.)
  226.         wuarchive.wustl.edu:/mirrors/misc/unix/unarj230.tar-z
  227.     garbo.uwasa.fi:/unix/arcers/unarj230.tar.Z
  228.  
  229.       unarj for Mac
  230.         mac.archive.umich.edu:/mac/util/compression/unarjmac.cpt.hqx      
  231.  
  232.       unarj for Amiga
  233.     ftp.funet.fi:pub/amiga/utilities/archivers/unarj-0.5.lha
  234.  
  235. .cpt: Compact Pro for Mac
  236.         sumex-aim.stanford.edu:/info-mac/util/compact-pro-132.hqx [36.44.0.6]
  237.  
  238. .gif: gif files are images compressed with the LZW algorithm. See the
  239.       comp.graphics FAQ list for programs manipulating .gif files. See
  240.       suffix .Z below for source of LZW.
  241.  
  242. .hqx: Macintosh BinHex format.. (BinHex is *not* a compression program,
  243.     it is similar to uuencode but handles multiple forks.)
  244.        for Mac:
  245.      mac.archive.umich.edu:/mac/utilities/compressionapps/binhex4.0.bin
  246.  
  247.        for Unix:
  248.          sumex-aim.stanford.edu:/info-mac/unix/mcvert-165.shar [36.44.0.6]
  249.  
  250. .lha:
  251. .lzh: lha for MSDOS (LZ77 with a trie data structure, plus secondary static
  252.           Huffman coding on a block basis)
  253.     wuarchive.wustl.edu:/mirrors/msdos/arc-lbr/lha213.exe   (exe)
  254.     wuarchive.wustl.edu:/mirrors/msdos/arc-lbr/lha211sr.zip (sources)
  255.     garbo.uwasa.fi:/pc/arcers/lha213.exe
  256.  
  257.       lharc for Unix. (LZ77 with hash table and binary trees, plus secondary
  258.           Huffman coding)
  259.            Warning: lharc can extract .lzh files created by
  260.            lharc 1.xx but not those created by lha. See lha for Unix below.
  261.         wuarchive.wustl.edu:/mirrors/misc/unix/lharc102a.tar-z
  262.     garbo.uwasa.fi:/unix/arcers/lharcsrc.zoo
  263.  
  264.       lharc for VMS. Same warning as for Unix lharc.
  265.     wuarchive.wustl.edu:/packages/compression/vax-vms/lharc.exe
  266.  
  267.       lha for Unix. Warning: all doc is in Japanese.
  268.     wuarchive.wustl.edu:/mirrors/misc/unix/lha101u.tar-z
  269.     garbo.uwasa.fi:/unix/arcers/lha-1.00.tar.Z
  270.           Contact: lha-admin@oki.co.jp
  271.  
  272.       lha for Mac
  273.         mac.archive.umich.edu:/mac/utilities/compressionapps/maclha2.0.cpt.hqx
  274.  
  275.       lha for Amiga
  276.     ftp.funet.fi:pub/amiga/utilities/archivers/LhA_e138.run
  277.  
  278.  
  279. .pak: pak for MSDOS (LZW algorithm)
  280.         wuarchive.wustl.edu:/mirrors/msdos/arc-lbr/pak251.exe
  281.     garbo.uwasa.fi:/pc/arcers/pak251.exe
  282.  
  283. .pit: PackIt (Macintosh)
  284.        for Mac:
  285.          sumex-aim.stanford.edu:/info-mac/util/stuffit-151.hqx  [36.44.0.6]
  286.  
  287.        for Unix:
  288.          sumex-aim.stanford.edu:/info-mac/unix/mcvert-165.shar [36.44.0.6]
  289.  
  290. .pp: PowerPacker (Amiga)
  291.     ftp.funet.fi:pub/amiga/fish/501-600/ff561/PPLib.lha
  292.  
  293. .sea: self-extracting archive (Macintosh)
  294.          Run the file to extract it. The self-extraction code can be
  295.          removed with:
  296.       mac.archive.umich.edu:/mac/utilities/compressionapps/desea1.11.cpt.hqx
  297.  
  298. .sit: Stuffit for Macintosh
  299.        for Mac:
  300.          sumex-aim.stanford.edu:/info-mac/util/stuffit-lite-30.hqx [36.44.0.6]
  301.  
  302.        for Unix:
  303.          sumex-aim.stanford.edu:/info-mac/unix/unsit-15.shar [36.44.0.6]
  304.  
  305.        for Amiga:
  306.      ftp.funet.fi:pub/amiga/utilities/archivers/unsit-1.5c2.lha
  307.  
  308. .tar: tar is *not* a compression program. However, to be kind for you:
  309.       for MSDOS
  310.     wuarchive.wustl.edu:/mirrors/msdos/starter/tarread.exe
  311.     garbo.uwasa.fi:/pc/unix/tar4dos.zoo
  312.  
  313.       for Unix
  314.         tar (you have it already. To extract: tar xvf file.tar)
  315.  
  316.       for VMS
  317.     wuarchive.wustl.edu:/packages/compression/vax-vms/tar.exe
  318.  
  319.       for Macintosh
  320.         sumex-aim.stanford.edu:/info-mac/util/tar-30.hqx
  321.  
  322.       for Amiga:
  323.     ftp.funet.fi:pub/amiga/fish/401-500/ff445/Tar.lha
  324.  
  325. .tar.Z, .tar-z, .taz: tar + compress
  326.       For Unix:     zcat file.tar.Z | tar xvf -
  327.       with GNU tar: tar xvZf file.tar.Z
  328.       Other OS: first uncompress (see .Z below) then untar (see .tar above)
  329.  
  330. .zip: pkzip 1.10 for MSDOS. (LZ77 with hashing, plus secondary static
  331.           Shannon-Fano encoding on whole file)
  332.            Contact: pkware.inc@mixcom.com
  333.          wuarchive.wustl.edu:/mirrors/msdos/zip/pkz110eu.exe.
  334.          garbo.uwasa.fi:/pc/arcers/pkz110eu.exe.
  335.            Note: pkz110eu.exe is an 'export' version without encryption.
  336.  
  337.       pkzip 1.93a for MSDOS. (LZ77 with hashing, plus secondary static
  338.            Huffman coding on a block basis)
  339.         Note: pkzip 1.93a is an alpha version, see item 3 below.
  340.          ux1.cso.uiuc.edu:/pc/exec-pc/pkz193a.exe [128.174.5.59]
  341.      ftp.tu-clausthal.de:/pub/msdos/archive/pkz193a.exe
  342.  
  343.       zip 1.9p1 and unzip 5.0 for Unix, MSDOS, VMS, OS/2, Atari, Mac, Amiga,...
  344.           Compatible with pkzip 1.93a (LZ77 with hashing, plus secondary static
  345.           Huffman coding on a block basis)
  346.             Contact: zip-bugs@wkuvx1.bitnet
  347.      oak.oakland.edu:/pub/msdos/zip/zip19p1.zip  (source)
  348.      oak.oakland.edu:/pub/msdos/zip/zip19p1x.zip (MSDOS exe)
  349.      oak.oakland.edu:/pub/msdos/zip/unzip50.zip  (source)
  350.      oak.oakland.edu:/pub/misc/unix/unzip50.tar-z (tar.Z source)
  351.      oak.oakland.edu:/pub/msdos/zip/unzip50.exe  (MSDOS exe)
  352.          quest.jpl.nasa.gov:/pub/AMIGA/unz51dx.*     (Amiga exe)
  353.          quest.jpl.nasa.gov:/pub/AMIGA/zip19hx.zip   (Amiga exe)
  354.          wuarchive.wustl.edu:/mirrors/garbo.uwasa.fi/arcutil/zcrypt19.zip
  355.          (encryption source. Non US residents must get it from garbo,see below)
  356.  
  357.      garbo.uwasa.fi:/unix/arcers/zip19p1.zip
  358.      garbo.uwasa.fi:/unix/arcers/unzip50.tar.Z.
  359.          garbo.uwasa.fi:/pc/arcutil/zcrypt19.zip (encryption code)
  360.  
  361. .zoo: zoo 2.10 for MSDOS (algorithm copied from that of lha, see lha above)
  362.       Contact: Rahul Dhesi <dhesi@cirrus.com>
  363.      wuarchive.wustl.edu:/mirrors/msdos/zoo/zoo210.exe
  364.      garbo.uwasa.fi:/pc/arcers/zoo210.exe
  365.  
  366.       zoo 2.10 for Unix, VMS
  367.          wsmr-simtel20.army.mil:pd8:<misc.unix>zoo210.tar-z [192.88.110.2]
  368.      garbo.uwasa.fi:/unix/arcers/zoo210.tar.Z
  369.  
  370.       zoo for Mac
  371.       mac.archive.umich.edu:/mac/utilities/compressionapps/maczoo.sit.hqx
  372.  
  373.       zoo for Amiga
  374.     ftp.funet.fi:pub/amiga/utilities/archivers/Zoo-2.1.lha
  375.  
  376. .F: freeze for Unix (LZ77 with hashing, plus secondary dynamic Huffman
  377.          encoding)
  378.      wuarchive.wustl.edu:/usenet/comp.sources.misc/volume25/freeze/part0[1-2].Z
  379.      ftp.inria.fr:/system/arch-compr/freeze-2.3.4.tar.Z
  380.      Contact: Leonid A. Broukhis <leo@s514.ipmce.su>
  381.  
  382. .Y: yabba for Unix, VMS, ... (Y coding, a variant of LZ78)
  383.   wuarchive.wustl.edu:/usenet/comp.sources.unix/volume24/yabbawhap/part0[1-4].Z
  384.   ftp.inria.fr:/system/arch-compr/yabba.tar.Z
  385.   Contact: Dan Bernstein <brnstnd@nyu.edu>
  386.  
  387. .Z: compress for Unix ('the' LZW algorithm)
  388.       It is likely that your Unix system has 'compress' already. Otherwise:
  389.     wuarchive.wustl.edu:/packages/compression/compress-4.1.tar
  390.         (not in .Z format to avoid chicken and egg problem)
  391.  
  392.     compress for MSDOS
  393.     wuarchive.wustl.edu:/mirrors/msdos/compress/comp430[ds].zip
  394.     garbo.uwasa.fi:/pc/unix/comp430d.zip
  395.  
  396.     compress for Macintosh
  397.         sumex-aim.stanford.edu:/info-mac/util/maccompress-32.hqx
  398.  
  399.     compress for Amiga
  400.     ftp.funet.fi:pub/amiga/utilities/archivers/compress-4.1.lha
  401.  
  402.     compress for Vax/VMS
  403.     wuarchive.wustl.edu:/packages/compression/vax-vms/lzcomp.exe
  404.     wuarchive.wustl.edu:/packages/compression/vax-vms/lzdcmp.exe
  405.  
  406. ------------------------------------------------------------------------------
  407.  
  408. Subject: [3]  What is the latest PKZIP version?
  409.  
  410. The latest official version is still pkzip 1.10. An alpha version
  411. 1.93a has been released in Oct 91 but pkzip 2.x is not officially
  412. released at the time of writing (Nov 27th 1992).  From the PKWARE BBS
  413. (June 92): "PKZIP 2.0 is expected to be released sometime in the next
  414. few months, as soon as possible".
  415.  
  416. See item 2 above for ftp locations of pkzip 1.10 and 1.93a.  There
  417. have been several bogus versions uploaded to some BBS's.  Some
  418. information is included below.
  419.  
  420.              The Computer Incident Advisory Capability
  421.                        INFORMATION BULLETIN
  422.  
  423.                          PKZIP Trojan Alert
  424.  
  425. PROBLEM:  Bogus versions of the PKZIP archiving software have been 
  426.           released to Bulletin Board Systems (BBS).
  427. PLATFORM: PCs running PC-DOS, or MS-DOS
  428. DAMAGE:   One version attempts to erase the hard disk.
  429. DETECTION: Look for the files: PKZ201.ZIP, PKZ201.EXE, PKZIPV2.ZIP, or
  430.           PKZIPV2.EXE 
  431. REMOVAL:  Save a copy of the files for CIAC, then delete the files. Do
  432.           not extract or run these files.
  433.  
  434.           Critical Facts about the PKZIP Trojan
  435.  
  436. CIAC has learned that two bogus versions of the popular archiving
  437. utility PKZIP for PC-DOS and MS-DOS machines are being circulated on
  438. several BBSs around the country. The two bogus versions of PKZIP are,
  439. 2.01 (PKZ201.ZIP and PKZ201.EXE) and 2.2 (PKZIPV2.ZIP and PKZIPV2.EXE).
  440. If you have downloaded any of these files, do not attempt to use them.
  441. You risk the destruction of all the data on your hard disk if you do.
  442.  
  443. At the current time, the released version of PKZIP is version 1.10. A
  444. new version of PKZIP is expected to be released in the next few months.
  445. Its version number was planned to be 2.00, but may be increased to a
  446. number greater than 2.2 to prevent confusion with the bogus versions.
  447. PKWARE Inc. has indicated it will never issue a version 2.01 or 2.2 of
  448. PKZIP. A good copy of the latest version of PKZIP can always be gotten
  449. from the PKWARE BBS listed below.
  450.  
  451. According to PKWARE Inc. version 2.01 is a hacked version of PKZIP 1.93
  452. Alpha.  While this version does not intentionally do any damage, it is
  453. alpha level software, and may have serious bugs in it.
  454.  
  455. Version 2.2 is a simple batch file that attempts to erase your C:\ and
  456. C:\DOS directories. If your hard disk has been erased by this program,
  457. you may be able to recover it using hard disk undelete utilities such
  458. as those in Norton Utilities, or PCTools. Don't do anything that might
  459. create or expand a file on your hard disk until you have undeleted the
  460. files, as you may overwrite the deleted files which will destroy them.
  461. To examine a file to see if it is version 2.2, type it to the screen
  462. with the DOS TYPE command. If the file that prints on the screen is a
  463. short batch file with commands such as DEL C:\*.*, or DEL C:\DOS\*.*
  464. then you have the bogus file.
  465.  
  466. For additional information or assistance, please contact CIAC:
  467.  
  468.      CIAC at (510) 422-8193/(FTS)
  469.          FAX (510) 423-8002/(FTS)
  470.      send e-mail to ciac@llnl.gov.
  471.  
  472. ------------------------------------------------------------------------------
  473.  
  474. Subject: [4] What is an archiver?
  475.  
  476.  
  477. There is a distinction between archivers and other compression
  478. programs:
  479.  
  480. - an archiver takes several input files, compresses them and produces
  481.   a single archive file. Examples are arc, arj, lha, zip, zoo.
  482.  
  483. - other compression programs create one compressed file for each
  484.   input file. Examples are freeze, yabba, compress. Such programs
  485.   are often combined with tar to create compressed archives (see
  486.   question 50: "What is this tar compression program?").
  487.  
  488. ------------------------------------------------------------------------------
  489.  
  490. Subject: [5] What is the best general purpose compression program?
  491.  
  492.  
  493. The answer is: it depends. (You did not expect a definitive answer,
  494. did you?)
  495.  
  496. It depends whether you favor speed, compression ratio, a standard and
  497. widely used archive format, the number of features, etc...  Just as
  498. for text editors, personal taste plays an important role. compress has
  499. 4 options, arj 2.30 has about 130 options; different people like
  500. different programs. *Please* do not start or continue flame wars on
  501. such matters of taste.
  502.  
  503. The only objective comparisons are speed and compression ratio. Here
  504. is a short table comparing various programs on a 33Mhz Compaq 386.
  505. All programs have been run on Unix SVR4, except pkzip and arj which
  506. only run on MSDOS.  Detailed benchmarks have been posted in
  507. comp.compression by Peter Gutmann <pgut1@cs.aukuni.ac.nz>.
  508.  
  509. *Please* do not post your own benchmarks made on your own files that
  510. nobody else can access. If you think that you must absolutely post yet
  511. another benchmark, make sure that your test files are available by
  512. anonymous ftp.
  513.  
  514. The programs compared here were chosen because they are the most popular
  515. or because they run on Unix and source is available.  For ftp
  516. information, see above. Two programs (hpack and comp-2) have been added
  517. because they achieve better compression (at the expense of speed)
  518. and one program (lzrw3-a) has been added because it favors speed at
  519. the expense of compression:
  520. - comp-2 is in wuarchive.wustl.edu:/mirrors/msdos/ddjmag/ddj9102.zip
  521.   (inner zip file nelson.zip),
  522. - hpack is in wuarchive.wustl.edu:/mirrors/misc/unix/hpack75a.tar-z
  523.   and garbo.uwasa.fi:/unix/arcers/hpack75a.tar.Z
  524. - ftp.adelaide.edu.au:/pub/compression/lzrw3-a.c  [129.127.40.3]
  525.  
  526. The 14 files used in the comparison are from the standard Calgary
  527. Text Compression Corpus, available by ftp on fsa.cpsc.ucalgary.ca [136.159.2.1]
  528. in /pub/text.compression.corpus/text.compression.corpus.tar.Z.
  529.  
  530. The whole corpus includes 18 files, but the 4 files paper[3-6] are
  531. generally omitted in benchmarks. It contains several kinds of file
  532. (ascii, binary, image, etc...) but has a bias towards large files.
  533. You may well get different ratings on the typical mix of files that
  534. you use daily, so keep in mind that the comparisons given below are
  535. only indicative.
  536.  
  537. The programs are ordered by decreasing total compressed size. For a
  538. fair comparison between archivers and other programs, this size is
  539. only the size of the compressed data, not the archive size.
  540.  
  541. The programs were run on an idle machine, so the elapsed time
  542. is significant and can be used to compare Unix and MSDOS programs.
  543.  
  544. [Note: I still have to add all decompression times.]
  545.  
  546.        size     lzrw3a   compress    lharc    yabba     pkzip    freeze 
  547. version:                   4.0       1.02      1.0       1.10     2.3.5
  548. options:                                    -m300000                    
  549.        ------    -----    ------    ------    ------    ------   ------
  550. bib    111261    49040     46528     46502     40456     41354    41515 
  551. book1  768771   416131    332056    369479    306813    350560   344793 
  552. book2  610856   274371    250759    252540    229851    232589   230861 
  553. geo    102400    84214     77777     70955     76695     76172    68626 
  554. news   377109   191291    182121    166048    168287    157326   155783 
  555. obj1    21504    12647     14048     10748     13859     10546    10453 
  556. obj2   246814   108040    128659     90848    114323     90130    85500 
  557. paper1  53161    24522     25077     21748     22453     20041    20021 
  558. paper2  82199    39479     36161     35275     32733     32867    32693 
  559. pic    513216   111000     62215     61394     65377     63805    53291 
  560. progc   39611    17919     19143     15399     17064     14164    14143 
  561. progl   71646    24358     27148     18760     23512     17255    17064 
  562. progp   49379    16801     19209     12792     16617     11877    11686 
  563. trans   93695    30292     38240     28092     31300     23135    22861 
  564.     3,141,622  1,400,105 1,259,141 1,200,580 1,159,340 1,141,821 1,109,290
  565. real             0m35s     0m59s     5m03s     2m40s              5m27s
  566. user             0m25s     0m29s     4m29s     1m46s              4m58s
  567. sys              0m05s     0m10s     0m07s     0m18s              0m08s
  568. MSDOS:                                                   1m39s
  569.                         
  570.  
  571.          zoo       lha       arj      pkzip      zip      hpack   comp-2   
  572.         2.10    1.0(Unix)   2.30      1.93a      1.9      0.75a      
  573.          ah    2.13(MSDOS)   -jm       -ex        -6                         
  574.        ------    ------    ------    ------    -------   ------   ------
  575. bib     40742     40740     36090     35186      34950    35619    29840  
  576. book1  339076    339074    318382    313566     312619   306876   237380  
  577. book2  228444    228442    210521    207204     206306   208486   174085  
  578. geo     68576     68574     69209     68698      68418    58976    64590  
  579. news   155086    155084    146855    144954     144395   141608   128047  
  580. obj1    10312     10310     10333     10307      10295    10572    10819  
  581. obj2    84983     84981     82052     81213      81336    80806    85465  
  582. paper1  19678     19676     18710     18519      18525    18607    16895  
  583. paper2  32098     32096     30034     29566      29674    29825    25453  
  584. pic     52223     52221     53578     52777      55051    51778    55461  
  585. progc   13943     13941     13408     13363      13238    13475    12896  
  586. progl   16916     16914     16408     16148      16175    16586    17354  
  587. progp   11509     11507     11308     11214      11182    11647    11668  
  588. trans   22580     22578     20046     19808      18879    20506    21023  
  589.       1,096,166 1,096,138 1,036,934 1,022,523 1,021,043 1,005,367  890,976
  590. real    4m07s     6m03s                         1m49s   1h22m17s  27m05s
  591. user    3m47s     4m23s                         1m43s   1h20m46s  19m27s
  592. sys     0m04s     0m08s                         0m02s      0m12s   2m03s
  593. MSDOS:            1m49s     2m41s     1m55s
  594.  
  595. Notes:
  596.  
  597. - the compressed data for 'zoo ah' is always two bytes longer than for
  598.   lha. This is simply because both programs are derived from the same
  599.   source (ar002, written by Haruhiko Okumura, available by ftp in
  600.   wuarchive.wustl.edu:/mirrors/msdos/arc_lbr/ar002.zip).
  601.  
  602. - hpack 0.75a gives slightly different results on SunOS (undeterministic
  603.   behaviour still under investigation).
  604.  
  605. - the MSDOS versions are all optimized with assembler code and were run
  606.   on a RAM disk. So it is not surprising that they often go faster than
  607.   their Unix equivalent.
  608.  
  609. ------------------------------------------------------------------------------
  610.  
  611. Subject: [7] Which books should I read?
  612.  
  613.  
  614. [BWC 1989] Bell, T.C, Witten, I.H, and Cleary, J.G.  "Text Compression",
  615.     Prentice-Hall 1989. ISBN: 0-13-911991-4. Price: approx. US$40
  616.     The reference on text data compression.
  617.  
  618. [Nel 1991] Mark Nelson, "The Data Compression Book"
  619.     M&T Books, Redwood City, CA, 1991.  ISBN 1-55851-216-0.
  620.     Price $36.95 including two 5" PC-compatible disks bearing
  621.     all the source code printed in the book.
  622.     A practical introduction to data compression.
  623.     The book is targeted at a person who is comfortable reading C code but
  624.     doesn't know anything about data compression.  Its stated goal is to get
  625.     you up to the point where you are competent to program standard
  626.     compression algorithms.
  627.  
  628. [Will 1990] Williams, R.  "Adaptive Data Compression", Kluwer Books, 1990.
  629.     ISBN: 0-7923-9085-7. Price: US$75.
  630.     Reviews the field of text data compression and then addresses the
  631.     problem of compressing rapidly changing data streams.
  632.  
  633. [Stor 1988] Storer, J.A.  "Data Compression: Methods and Theory", Computer
  634.     Science Press, Rockville, MD. ISBN: 0-88175-161-8.
  635.     A survey of various compression techniques, mainly statistical
  636.     non-arithmetic compression and LZSS compression.  Includes complete Pascal
  637.     code for a series of LZ78 variants.
  638.  
  639. [ACG 1991] Advances in Speech Coding, edited by Atal, Cuperman, and Gersho,
  640.     Kluwer Academic Press, 1991.
  641.  
  642. [GG 1991] Vector Quantization and Signal Compression, by Gersho and Gray,
  643.     Kluwer Acad. Press, 1991
  644.  
  645. [CT 1991] Elements of Information Theory, by T.M.Cover and J.A.Thomas
  646.      John Wiley & Sons, 1991.
  647.  
  648. Review papers:
  649.  
  650. [BWC 1989] Bell, T.C, Witten, I.H, and Cleary, J.G.  "Modeling for Text
  651.     Compression", ACM Computing Surveys, Vol.21, No.4 (December 1989), p.557
  652.     A good general overview of compression techniques (as well as modeling for
  653.     text compression); the condensed version of "Text Compression".
  654.  
  655. [Lele 1987] Lelewer, D.A, and Hirschberg, D.S.  "Data Compression", ACM
  656.     Computing Surveys, Vol.19, No.3 (September 1987), p.261.
  657.     A survey of data compression techniques which concentrates on Huffman
  658.     compression and makes only passing mention of other techniques.
  659.  
  660.  
  661. ------------------------------------------------------------------------------
  662.  
  663. Subject: [8] What about patents on data compression algorithms?
  664.  
  665.  
  666. [Note: the appropriate group for discussing software patents is
  667. comp.patents (or misc.legal.computing), not comp.compression.]
  668.  
  669. All patents mentioned here are US patents, and thus probably
  670. not applicable outside the US. See item 70, "Introduction to data
  671. compression" for the meaning of LZ77, LZ78 or LZW.
  672.  
  673.  
  674. (a) Run length encoding
  675.  
  676. - Tsukiyama has two patents on run length encoding: 4,586,027 and 4,872,009
  677.   granted in 1986 and 1989 respectively. The first one covers run length
  678.   encoding in its most primitive form: a length byte followed by the
  679.   repeated byte. The second patent covers the 'invention' of limiting the
  680.   run length to 16 bytes and thus the encoding of the length on 4 bits.
  681.   Here is the start of claim 1 of patent 4,872,009, just for pleasure:
  682.  
  683.     1. A method of transforming an input data string comprising a plurality
  684.     of data bytes, said plurality including portions of a plurality of
  685.     consecutive data bytes identical to one another, wherein said data
  686.     bytes may be of a plurality of types, each type representing different
  687.     information, said method comprising the steps of: [...]
  688.  
  689.  
  690. (b) LZ77
  691.  
  692. - The Gibson & Graybill patent 5,049,881 covers the LZRW1 algorithm
  693.   previously discovered by Ross Williams. (See item 5 for the ftp site
  694.   with all LZRW derivatives). Claims 4 and 12 are very general and
  695.   could be interpreted as applying to any LZ algorithm using hashing
  696.   (including all variants of LZ78):
  697.  
  698.      4. A compression method for compressing a stream of input data into
  699.      a compressed stream of output data based on a minimum number of
  700.      characters in each input data string to be compressed, said
  701.      compression method comprising the creation of a hash table, hashing
  702.      each occurrence of a string of input data and subsequently searching
  703.      for identical strings of input data and if such an identical string
  704.      of input data is located whose string size is at least equal to the
  705.      minimum compression size selected, compressing the second and all
  706.      subsequent occurrences of such identical string of data, if a string
  707.      of data is located which does not match to a previously compressed
  708.      string of data, storing such data as uncompressed data, and for each
  709.      input strings after each hash is used to find a possible previous
  710.      match location of the string, the location of the string is stored
  711.      in the hash table, thereby using the previously processed data to
  712.      act as a compression dictionary.
  713.  
  714.   Claim 12 is identical, with 'method' replaced with 'apparatus'.
  715.   Since the 'minimal compression size' can be as small as 2, the claim
  716.   could cover any dictionary technique of the LZ family. However the
  717.   text of the patent and the other claims make clear that the patent 
  718.   should cover the LZRW1 algorithm only.
  719.  
  720.   The following papers, published before the patent was filed, describe
  721.   applications of hashing to LZ77 compression:
  722.  
  723.     Brent, R.P.  "A Linear Algorithm for Data Compression", Australian
  724.     Computer Journal, Vol.19, No.2 (May 1987), p.64.
  725.  
  726.     Bell, T. "Longest match string searching for Ziv-Lempel compression"
  727.     Res. Rept. 6/89, Dept. of Computer Science, Univ. of Canterbury,
  728.     New Zealand (Feb 89).
  729.  
  730.  
  731. - Phil Katz, author of pkzip, also has a patent on LZ77 (5,051,745)
  732.   but the claims only apply to sorted hash tables, and when the hash
  733.   table is substantially smaller than the window size.
  734.  
  735. - Robert Jung, author of 'arj', has recently been granted patent 5,140,321
  736.   for one variation of LZ77 with hashing.  This patent covers the LZRW3-A
  737.   algorithm, also previously discovered by Ross Williams. LZRW3-A was posted
  738.   on comp.compression on July 15, 1991. The patent was filed two months later
  739.   on Sept 4, 1991. (The US patent system allows this because of the
  740.   'invention date' rule.)
  741.  
  742. - Fiala and Greene obtained in 1990 a patent (4,906,991) on all
  743.   implementations of LZ77 using a tree data structure. Claim 1 of the
  744.   patent is much broader than the algorithms published by Fiala and
  745.   Greene in Comm.ACM, April 89. The patent covers the algorithm
  746.   published by Rodeh and Pratt in 1981 (J. of the ACM, vol 28, no 1,
  747.   pp 16-24).  It also covers the algorithm previously patented by
  748.   Eastman-Lempel-Ziv (4,464,650), and the algorithms used in lharc,
  749.   lha and zoo.
  750.  
  751. - IBM patented (5,001,478) the idea of combining a history buffer (the
  752.   LZ77 technique) and a lexicon (as in LZ78).
  753.  
  754.  
  755. (c) LZ78
  756.  
  757. - The LZW algorithm used in 'compress'is patented by IBM (4,814,746)
  758.   and Unisys (4,558,302). It is also used in the V.42bis compression
  759.   standard (see question 11 on V.42bis below) and in Postscript Level 2.
  760.   (Unisys sells the license to modem manufacturers for a onetime
  761.   $25,000 fee.) The IBM patent application was filed three weeks
  762.   before that of Unisys, but the US patent office failed to recognize
  763.   that they covered the same algorithm. (The IBM patent is more
  764.   general, but its claim 7 is exactly LZW.)
  765.  
  766. - AP coding is patented by Storer (4,876,541). (Get the yabba package
  767.   for source code, see question 2 above, file type .Y)
  768.  
  769.  
  770. (d) other data compression algorithms
  771.  
  772. - IBM holds a patent on the Q-coder implementation of arithmetic
  773.   coding.  The arithmetic coding option of the JPEG standard requires
  774.   use of the patented algorithm.  No JPEG-compatible method is
  775.   possible without infringing the patent, because what IBM actually
  776.   claims rights to is the underlying probability model (the heart of
  777.   an arithmetic coder). (See the JPEG FAQ for details.)
  778.  
  779. - Bacon has patented (4,612,532) some from of Markov modeling.
  780.  
  781.  
  782. As can be seen from the above list, *all* the most popular compression
  783. programs (compress, pkzip, zoo, lha, arj) are now covered by patents.
  784. (This says nothing about the validity of these patents.)
  785.  
  786. Here are some references on data compression patents. A number of them are
  787. taken from the list maintained by Michael Ernst <mernst@theory.lcs.mit.edu>
  788. in mintaka.lcs.mit.edu:/mitlpf/ai/patent-list (or patent-list.Z).
  789.  
  790. 4,464,650
  791. Apparatus and method for compressing data signals and restoring the
  792. compressed data signals
  793. inventors Lempel, Ziv, Cohn, Eastman
  794. assignees Sperry Corporation and At&T Bell Laboratories
  795. filed 8/10/81, granted 8/7/84
  796.  
  797. 4,558,302
  798. High speed data compression and decompression apparatus and method
  799. inventor Welch
  800. assignee Sperry Corporation (now Unisys)
  801. filed 6/20/83, granted 12/10/85
  802. The text for this patent can be ftped from rusmv1.rus.uni-stuttgart.de
  803. (129.69.1.12) in /info/comp.patents/US4558302.Z.
  804.  
  805. 4,586,027
  806. Method and system for data compression and restoration
  807. assignee Hitachi, inventor Tsukimaya et al.
  808. filed 08/07/84, granted 04/29/86
  809.  
  810. 4,612,532
  811. inventor Bacon
  812. granted 9/1986
  813.  
  814. 4,814,746
  815. Data compression method
  816. inventors Victor S. Miller, Mark N. Wegman
  817. assignee IBM
  818. filed 8/11/86, granted 3/21/89
  819. A previous application was filed on 6/1/83, three weeks before the
  820. application by Welch (4,558,302)
  821.  
  822. 4,872,009
  823. Method and apparatus for data compression and restoration
  824. assignee Hitachi, inventor Tsukimaya et al.
  825. filed 12/07/87, granted 10/03/89
  826.  
  827. 4,876,541
  828. Stem [sic] for dynamically compressing and decompressing electronic data
  829. inventor James A. Storer
  830. assignee Data Compression Corporation
  831. filed 10/15/87, granted 10/24/89
  832.  
  833. 4,955,066
  834. Compressing and Decompressing Text Files
  835. inventor Notenboom, L.A.
  836. assignee Microsoft
  837. filed  10/13/89, granted 09/04/90
  838.  
  839. 5,001,478
  840. Method of Encoding Compressed Data
  841. filed 12/28/89, granted 03/19/91
  842. inventor Michael E. Nagy
  843. assignee IBM
  844.  
  845. 5,049,881
  846. Apparatus and method for very high data rate-compression incorporating
  847. lossless data compression and expansion utilizing a hashing technique
  848. inventors Dean K. Gibson, Mark D. Graybill
  849. assignee Intersecting Concepts, Inc.
  850. filed 6/18/90, granted 9/17/91
  851.  
  852. 5,051,745
  853. String searcher, and compressor using same
  854. inventor  Phillip W. Katz (author of pkzip)
  855. filed  8/21/90, granted 9/24/91
  856.  
  857. 4,906,991
  858. Textual substitution data compression with finite length search window
  859. inventors Fiala,E.R., and Greene,D.H.
  860. filed 4/29/1988, granted 3/6/1990
  861. assignee Xerox Corporation
  862.  
  863. 5,109,433
  864. Compressing and decompressing text files
  865. assignee Microsoft
  866.  
  867. 5,140,321
  868. Data compression/decompression method and apparatus
  869. filed 9/4/91, granted 8/18/92
  870. inventor Robert Jung
  871. assignee Prime Computer
  872.  
  873. ------------------------------------------------------------------------------
  874.  
  875. Subject: [9]  The WEB 16:1 compressor.
  876.  
  877.  
  878. [WARNING: this topic has generated the greatest volume of news in the
  879. history of comp.compression. Read this before posting on this subject.]
  880.  
  881.  
  882. (a) What the press says
  883.  
  884. April 20, 1992  Byte Week Vol 4. No. 25:
  885.  
  886.    "In an announcement that has generated high interest - and more than a
  887.    bit of skepticism - WEB Technologies (Smyrna, GA) says it has
  888.    developed a utility that will compress files of greater than 64KB in
  889.    size to about 1/16th their original length.  Furthermore, WEB says its
  890.    DataFiles/16 program can shrink files it has already compressed."
  891.    [...]
  892.    "A week after our preliminary test, WEB showed us the program successfully
  893.    compressing a file without losing any data.  But we have not been able
  894.    to test this latest beta release ourselves."
  895.    [...]
  896.    "WEB, in fact, says that virtually any amount of data can be squeezed 
  897.    to under 1024 bytes by using DataFiles/16 to compress its own output
  898.    multiple times."
  899.  
  900. June 1992 Byte, Vol 17 No 6:
  901.  
  902.    [...] According to Earl Bradley, WEB Technologies' vice president of
  903.    sales and marketing, the compression algorithm used by DataFiles/16
  904.    is not subject to the laws of information theory. [...]
  905.  
  906.  
  907. (b) First details, by John Wallace <buckeye@spf.trw.com>:
  908.  
  909. I called WEB at (404)514-8000 and they sent me some product
  910. literature as well as chatting for a few minutes with me on the phone.
  911. Their product is called DataFiles/16, and their claims for it are
  912. roughly those heard on the net.
  913.  
  914. According to their flier:
  915.  
  916. "DataFiles/16 will compress all types of binary files to approximately
  917. one-sixteenth of their original size ... regardless of the type of
  918. file (word processing document, spreadsheet file, image file,
  919. executable file, etc.), NO DATA WILL BE LOST by DataFiles/16."
  920. (Their capitalizations; 16:1 compression only promised for files >64K
  921. bytes in length.)
  922.  
  923. "Performed on a 386/25 machine, the program can complete a
  924. compression/decompression cycle on one megabyte of data in less than
  925. thirty seconds"
  926.  
  927. "The compressed output file created by DataFiles/16 can be used as the 
  928. input file to subsequent executions of the program.  This feature of 
  929. the utility is known as recursive or iterative compression, and will 
  930. enable you to compress your data files to a tiny fraction of the 
  931. original size.  In fact, virtually any amount of computer data can 
  932. be compressed to under 1024 bytes using DataFiles/16 to compress its 
  933. own output files muliple times.  Then, by repeating in reverse the 
  934. steps taken to perform the recusive compression, all original data 
  935. can be decompressed to its original form without the loss of a single 
  936. bit."
  937.  
  938. Their flier also claims: 
  939.  
  940. "Constant levels of compression across ALL TYPES of FILES"
  941. "Convenient, single floppy DATA TRANSPORTATION"
  942.  
  943. From my telephone conversation, I was was assured that this is an
  944. actual compression program.  Decompression is done by using only the 
  945. data in the compressed file; there are no hidden or extra files.
  946.  
  947.  
  948. (c) More information, by Rafael Ramirez <rafael.ramirez@channel1.com>:
  949.  
  950.    Today (Tuesday, 28th) I got a call from Earl Bradley of Web
  951. who now says that they have put off releasing a software version of
  952. the algorithm because they are close to signing a major contract with
  953. a big company to put the algorithm in silicon.  He said he could not
  954. name the company due to non-disclosure agreements, but that they had
  955. run extensive independent tests of their own and verified that the
  956. algorithm works. [...]
  957.  
  958. He said the algorithm is so simple that he doesn't want anybody
  959. getting their hands on it and copying it even though he said they
  960. have filed a patent on it. [...] Mr. Bradley said the silicon version
  961. would hold up much better to patent enforcement and be harder to copy.
  962.  
  963.    He claimed that the algorithm takes up about 4K of code, uses only
  964. integer math, and the current software implementation only uses a 65K
  965. buffer.  He said the silicon version would likely use a parallel
  966. version and work in real-time. [...]
  967.  
  968.  
  969. (d) The impossiblity proofs.
  970.  
  971. It is impossible for a given program to compress without loss *all*
  972. files greater than a certain size by at least one bit. This can be
  973. proven by a simple counting argument. (Many other proofs have been
  974. posted on comp.compression, *please* do not post yet another one.)
  975.  
  976. Assume that the program can compress without loss all files of size >= N
  977. bits.  Compress with this program all the 2^N files which have
  978. exactly N bits.  All compressed files have at most N-1 bits, so there
  979. are at most (2^N)-1 different compressed files [2^(N-1) files of size
  980. N-1, 2^(N-2) of size N-2, and so on, down to 1 file of size 0]. So at
  981. least two different input files must compress to the same output file.
  982. Hence the compression program cannot be lossless. (Stronger results
  983. about the number of incompressible files can be obtained, but the
  984. proofs are a little more complex.)
  985.  
  986. This argument applies of course to WEB's case (take N = 64K*8 bits).
  987. Note that no assumption is made about the compression algorithm.
  988. The proof applies to *any* algorithm, including those using an
  989. external dictionary, or repeated application of another algorithm,
  990. or combination of different algorithms, or representation of the
  991. data as formulas, etc... All schemes are subject to the counting argument.
  992. There is no need to use information theory to provide a proof, just
  993. basic mathematics.
  994.  
  995. This assumes of course that the information available to the decompressor
  996. is only the bit sequence of the compressed data. If external information
  997. such as a file name or a number of iterations is necessary to decompress
  998. the data, the bits providing the extra information must be included in
  999. the bit count of the compressed data. (Otherwise, it would be sufficient
  1000. to consider any input data as a number, use this as the iteration
  1001. count or file name, and pretend that the compressed size is zero.)
  1002.  
  1003. [See also question 73 "What is the theoretical compression limit?" in
  1004. part 2 of this FAQ.]
  1005.  
  1006.  
  1007. (e) No software version
  1008.  
  1009. Appeared on BIX, reposted by Bruce Hoult <Bruce.Hoult@actrix.gen.nz>:
  1010.  
  1011. tojerry/chaos #673, from abailey, 562 chars, Tue Jun 16 20:40:34 1992
  1012. Comment(s). 
  1013. ----------
  1014. TITLE: WEB Technology
  1015. I promised everyone a report when I finally got the poop on WEB's
  1016. 16:1 data compression. After talking back and forth for a year
  1017. and being put off for the past month by un-returned phone calls,
  1018. I finally got hold of Marc Spindler who is their sales manager.
  1019.  
  1020. _No_ software product is forth coming, period!
  1021.  
  1022. He began talking about hardware they are designing for delivery
  1023. at the end of the year. [...]
  1024.  
  1025.  
  1026. (f) Product cancelled
  1027.  
  1028. Posted by John Toebes <toebes@bnr.ca> on Aug 10th, 1992:
  1029.  
  1030. [Long story omitted, confirming the reports made above about the
  1031. original WEB claims.]
  1032.  
  1033. 10JUL92 - Called to Check Status.  Was told that testing had uncovered a
  1034.           new problem where 'four numbers in a matrix were the same
  1035.           value' and that the programmers were off attempting to code a
  1036.           preprocessor to eliminate this rare case.  I indicated that he
  1037.           had told me this story before.  He told me that the
  1038.           programmers were still working on the problem.
  1039.  
  1040. 31JUL92 - Final Call to Check Status.  Called Earl in the morning and
  1041.           was told that he still had not heard from the programmers. [...]
  1042.           Stated that if they could not resolve the problem then there would
  1043.           probably not be a product.
  1044.  
  1045. 03AUG92 - Final Call.  Earl claims that the programmers are unable to
  1046.           resolve the problem.  I asked if this meant that there would
  1047.           not be a product as a result and he said yes.
  1048.  
  1049.  
  1050. (g) Conclusion
  1051.  
  1052. The last report given above should put an end to the WEB story.
  1053.  
  1054. [Note from the FAQ maintainer: I will keep this long story in the FAQ
  1055. for a while, and will remove it when the dust has finally settled
  1056. down.]
  1057.  
  1058. ------------------------------------------------------------------------------
  1059.  
  1060. Subject: [11] What is the V.42bis standard?
  1061.  
  1062.  
  1063. A description of the V.42bis standard is given in "The V.42bis
  1064. standard for data-compressing modems," by Clark Thomborson
  1065. <cthombor@theory.lcs.mit.edu>, IEEE Micro, Oct 1992, pp. 41-53. 
  1066.  
  1067. Short introduction, by Alejo Hausner <hausner@qucis.queensu.ca>:
  1068.  
  1069. The V.42bis Compression Standard was proposed by the International
  1070. Consultative Committee on Telephony and Telegraphy (CCITT) as an
  1071. addition to the v.42 error-correction protocol for modems. Its purpose
  1072. is to increase data throughput, and uses a variant of the
  1073. Lempel-Ziv-Welch (LZW) compression method.  It is meant to be
  1074. implemented in the modem hardware, but can also be built into the
  1075. software that interfaces to an ordinary non-compressing modem.
  1076.  
  1077. V.42bis can send data compressed or not, depending on the
  1078. data.  There are some types of data that cannot be
  1079. compressed.  For example, if a file was compressed first,
  1080. and then sent through a V.42bis modem, the modem would not
  1081. likely reduce the number of bits sent.  Indeed it is likely
  1082. that the amount of data would increase somewhat.
  1083.  
  1084. To avoid this problem, the algorithm constantly monitors the
  1085. compressibility of the data, and if it finds fewer bits
  1086. would be necessary to send it uncompressed, it switches to
  1087. transparent mode.  The sender informs the receiver of this
  1088. transition through a reserved escape code.  Henceforth the
  1089. data is passed as plain bytes.
  1090.  
  1091. The choice of escape code is clever.  Initially, it is a
  1092. zero byte.  Any occurrence of the escape code is replaced,
  1093. as is customary, by two escape codes.  In order to prevent a
  1094. string of escape codes from temporarily cutting throughput
  1095. in half, the escape code is redefined by adding 51 mod 256
  1096. each time it is used.
  1097.  
  1098. While transmitting in transparent mode, the sender maintains
  1099. the LZW trees of strings, and expects the receiver to do
  1100. likewise.  If it finds an advantage in returning to
  1101. compressed mode, it will do so, first informing the receiver
  1102. by a special control code.  Thus the method allows the
  1103. hardware to adapt to the compressibility of the data.
  1104.  
  1105.  
  1106. The CCITT standards documents are available by ftp on src.doc.ic.ac.uk,
  1107. in directory doc/ccitt-standards/ccitt. The v42bis standard is in
  1108. /doc/ccitt-standards/ccitt/1992/v/v42bis.asc.Z.
  1109. (ccitt standards used to be on ftp.uu.net in /doc/standards/ccitt
  1110. but this directory is now empty -- Aug 11th.)
  1111.  
  1112. ------------------------------------------------------------------------------
  1113.  
  1114. Subject: [12] I need source for the winners of the Dr Dobbs compression contest
  1115.  
  1116.  
  1117. The source of the top 6 programs of the Feb 91 Dr Dobbs data compression
  1118. contest are available by ftp on
  1119.   wsmr-simtel20.army.mil in pd1:<msdos.compress>ddjcompr.zip. [192.88.110.2]
  1120.   garbo.uwasa.fi:/pc/source/ddjcompr.zip [128.214.87.1]
  1121.  
  1122. The sources are in MSDOS end-of-line format, one directory per
  1123. program.  Unix or VMS users, use "unzip -a ddjcompr" to get correct
  1124. end-of-lines (add -d to recreate the directory structure if you are
  1125. using an obsolete version of unzip such as 4.1). Three of the 6
  1126. programs are not portable and only run on MSDOS. compact and urban
  1127. work on Unix, sixpack only requires minor modifications.
  1128.  
  1129. ------------------------------------------------------------------------------
  1130.  
  1131. Subject: [13] I need source for arithmetic coding
  1132.  
  1133.  
  1134. (See question 70 for an introduction to arithmetic coding.)
  1135.  
  1136. The source for the arithmetic coder described in Chap.5 of Bell,
  1137. Cleary, and Witten's book "Text Compression" (see question 7 above)
  1138. (or, equivalently, in: Witten, Neal, and Cleary's article "Arithmetic
  1139. Coding for data Compression" from Communications of the Association
  1140. for Computing Machinery, 30 (6), pp.520-540, June, 1987) is available
  1141. via anonymous ftp from fsa.cpsc.ucalgary.ca (136.159.2.1) in directory
  1142. /pub/arithmetic.coding.  It only comes with a simple order-0 model but
  1143. it's set up so that adding your own more sophisticated one is
  1144. straightforward.
  1145.  
  1146. A low precision arithmetic coding implementation avoiding hardware
  1147. division is available on the same site (fsa.cpsc.ucalgary.ca)
  1148. in /pub/arithmetic.coding/low.precision.version/low.precision.version.shar.
  1149.  
  1150. Kris Popat <popat@image.mit.edu> has worked on "Scalar Quantization
  1151. with Arithmetic Coding."  It describes an arithmetic coding technique
  1152. which is quite general and computationally inexpensive.  The
  1153. documentation and example C code are available via anonymous ftp from
  1154. media-lab.media.mit.edu (18.85.0.2), in /pub/k-arith-code.
  1155.  
  1156. The program 'urban' in ddjcompr.zip (see item 12 above) is a high order
  1157. arithmetic coder working at the bit level. It is written by Urban Koistinen
  1158. <md85-epi@nada.kth.se>.
  1159.  
  1160. ------------------------------------------------------------------------------
  1161.  
  1162. Subject: [15] Where can I get image compression programs?
  1163.  
  1164.  
  1165. JPEG:
  1166.       Source code for most any machine:
  1167.       ftp.uu.net:/graphics/jpeg/jpegsrc.v3.tar.Z [137.39.1.9]
  1168.       nic.funet.fi:/pub/graphics/programs/jpeg/jpegsrc.v3.tar.Z [128.214.6.100]
  1169.       Contact: jpeg-info@uunet.uu.net (Independent JPEG Group)
  1170.  
  1171.       xv, an image viewer which can read JPEG pictures, is available in
  1172.       ftp.cicb.fr:/pub/X11R5/contrib/xv-2.20.tar.Z  [129.20.128.2]
  1173.  
  1174. epic:
  1175.       whitechapel.media.mit.edu:/pub/epic.tar.Z [18.85.0.125]
  1176.       The "Lenna" test image is available as part of the EPIC package,
  1177.       where it is named "test_image".
  1178.  
  1179. compfits:
  1180.       uwila.cfht.hawaii.edu:/pub/compfits/compfits.tar.Z  [128.171.80.50]
  1181.       Contact: Jim Wright <jwright@cfht.hawaii.edu>
  1182.  
  1183. fitspress:
  1184.       cfata4.harvard.edu:/pub/fitspress08.tar.Z [128.103.40.79]
  1185.  
  1186. tiff:
  1187.       For source and sample images, see question 18 below.
  1188.  
  1189. ------------------------------------------------------------------------------
  1190.  
  1191. Subject: [16] What is the state of the art in lossless image compression?
  1192.  
  1193.  
  1194. The current state-of-the-art is the JBIG algorithm.  For an
  1195. introduction to JBIG, see question 74 in part 2.
  1196.  
  1197. JBIG works best on bi-level images (like faxes) and also works well on
  1198. Gray-coded grey scale images up to about six or so bits per pixel.  You
  1199. just apply JBIG to the bit planes individually.  For more bits/pixel,
  1200. lossless JPEG provides better performance, sometimes. (For JPEG, see
  1201. question 19 below.)
  1202.  
  1203. You can find a description of JBIG in ISO/IEC CD 11544, contained in
  1204. document ISO/IEC JTC1/SC2/N2285.  The only way to get it is to ask
  1205. your National Standards Body for a copy. In the USA, call ANSI at
  1206. (212) 642-4900.
  1207.  
  1208. ------------------------------------------------------------------------------
  1209.  
  1210. Subject: [17] What is the state of fractal compression?
  1211.  
  1212.  
  1213. from Tal Kubo <kubo@zariski.harvard.edu>:
  1214.  
  1215. According to Barnsley's book 'Fractals Everywhere', this method is
  1216. based on a measure of deviation between a given image and its
  1217. approximation by an IFS code.  The Collage Theorem states that there is
  1218. a convergent process to minimize this deviation.  Unfortunately,
  1219. according to an article Barnsley wrote for BYTE a few years ago, this
  1220. convergence was rather slow, about 100 hours on a Cray, unless assisted by
  1221. a person.
  1222.  
  1223. Barnsley et al are not divulging any technical information beyond the
  1224. meager bit in 'Fractals Everywhere'.  The book explains the idea of IFS
  1225. codes at length, but is vague about the application of the Collage theorem
  1226. to specific compression problems.
  1227.  
  1228. There is reason to believe that Barnsley's company has
  1229. *no algorithm* which takes a given reasonable image and achieves
  1230. the compression ratios initially claimed for their fractal methods.
  1231. The 1000-to-1 compression advertised was achieved only for a 'rigged'
  1232. class of images, with human assistance. The best unaided
  1233. performance I've heard of is good lossy compression of about 80-1.
  1234.  
  1235. Steve Tate <srt@duke.cs.duke.edu> confirms:
  1236.  
  1237. Compression ratios (unzoomed) seem to range from 20:1 to 60:1...  The
  1238. quality is considerably worse than wavelets or JPEG on most of the
  1239. non-contrived images I have seen.
  1240.  
  1241. But Yuval Fisher <fisher@inls1.ucsd.edu> disagrees:
  1242.  
  1243. Their performance has improved dramatically beyond what they were
  1244. talking about in BYTE a few years ago.  Human assistance to the
  1245. compression is no longer needed and the compression time is
  1246. reasonable, although the more time and compute power you throw at the
  1247. compression, the smaller the resulting file for the same level of
  1248. quality.
  1249.  
  1250. Geoffrey A Stephenson <ketlux@ketlux.demon.co.uk> adds:
  1251.  
  1252. Iterated systems are shipping a general purpose compressor at about
  1253. 300 Pounds in the UK that claims "640x480 24 bit colour compression of
  1254. about 1 min at 922k -> 10k on a 486/50 software only, decomp. to 8
  1255. bits in 3 secs, etc." At a recent multimedia conference in London they
  1256. handed out free demo disks that show the decomp. in action. The
  1257. package runs under both DOS anf WIN (DLLs provided for use in
  1258. applications). They also sell a board to speed up compression and
  1259. offer versions supporting full motion video (but not apparently at all
  1260. SVGA sizes like the static picture version). I have not yet got my
  1261. hands on a full version to test different types of pictures, but
  1262. friends have a and claim it looks good.
  1263.  
  1264.  
  1265. Programs:
  1266.  
  1267. A fractal image compression program is available by ftp in
  1268. lyapunov.ucsd.edu:/pub/young-fractal/unifs10.zip. (Unix users, See
  1269. item 2 above for unzip on Unix.) Note the file size before you ftp it:
  1270. 1.2 MB. The package contains source for compression and decompression,
  1271. source for X-windows decompression, MSDOS executables and images.
  1272.  
  1273. A fractal image decompression program (note: decompression only) is
  1274. available in /pub/inls-ucsd/fractal-2.0.tar on on the same ftp site
  1275. (lyapunov.ucsd.edu). Note the file size before you ftp it: 1.3 MB.
  1276. This file also contains a paper by Yuval Fisher (see reference below),
  1277. and some executables and sample images. Reading this paper is required
  1278. to understand how the Young compression program (see above) works.
  1279.  
  1280.  
  1281. References:
  1282.   A. Jacquin, 'Fractal image coding based on a theory of iterated
  1283.     contractive image transformations', Visual Comm. and Image
  1284.     Processing, vol SPIE-1360, 1990. (The best paper that explains
  1285.     the concept in a simple way.)
  1286.  
  1287.   A. Jacquin, "A Fractal Theory of Iterated Markov Operators with
  1288.     Applications to Digital Image Coding", PhD Thesis, Georgia Tech, 1989.
  1289.   It can be obtained from university microfilms for $35, phone 1-800-521-0600.
  1290.  
  1291.   M. Barnsley, L. Anson, "Graphics Compression Technology, SunWorld,
  1292.     October 1991, pp. 42-52.
  1293.   M.F. Barnsley, A. Jacquin, F. Malassenet, L. Reuter & A.D. Sloan,
  1294.     'Harnessing chaos for image synthesis', Computer Graphics,
  1295.     vol 22 no 4 pp 131-140, 1988.
  1296.   M.F. Barnsley, A.E. Jacquin, 'Application of recurrent iterated
  1297.     function systems to images', Visual Comm. and Image Processing,
  1298.     vol SPIE-1001, 1988.
  1299.   A. Jacquin, "Image Coding Based on a Fractal Theory of Iterated Contractive
  1300.     Image Transformations" p.18, January 1992 (Vol 1 Issue 1) of IEEE Trans
  1301.     on Image Processing.
  1302.   A.E. Jacquin, 'A novel fractal block-coding technique for digital
  1303.     images', Proc. ICASSP 1990.
  1304.   G.E. Oien, S. Lepsoy & T.A. Ramstad, 'An inner product space
  1305.     approach to image coding by contractive transformations',
  1306.     Proc. ICASSP 1991, pp 2773-2776.
  1307.   D.S. Mazel, Fractal Modeling of Time-Series Data, PhD Thesis,
  1308.     Georgia Tech, 1991.    (One dimensional, not pictures)
  1309.   S. A. Hollatz, "Digital image compression with two-dimensional affine
  1310.     fractal interpolation functions", Department of Mathematics and
  1311.     Statistics, University of Minnesota-Duluth, Technical Report 91-2.
  1312.     (a nuts-and-bolts how-to-do-it paper on the technique)
  1313.   Stark, J., "Iterated function systems as neural networks",
  1314.     Neural Networks, Vol 4, pp 679-690, Pergamon Press, 1991.
  1315.   Monro D M and Dudbridge F, "Fractal block coding of images",
  1316.     Electronics Letters 28(11):1053-1054 (1992)
  1317.   Beaumont J M, "Image data compression using fractal techniques",
  1318.     British Telecom Technological Journal 9(4):93-108 (1991)
  1319.   Fisher Y, "Fractal image compression", Siggraph 92
  1320.   Graf S, "Barnsley's Scheme for the Fractal Encoding of Images",
  1321.     Journal Of Complexity, V8, 72-78 (1992).
  1322.  
  1323. Books:
  1324.     The Fractal Transform,
  1325.     Michael F. Barnsley and Louisa F. Anson
  1326.     ISBN 0-86720-218-1, ca. 250 pp, $49.95
  1327.  
  1328.     Fractal Image Compression
  1329.     Michael F. Barnsley and Lyman P. Hurd
  1330.     ISBN 0-86720-457-5, ca. 250 pp., $49.95
  1331.  
  1332. Barnsley's company is:
  1333.  
  1334. Iterated Systems, Inc.
  1335. 5550A Peachtree Parkway, Suite 545
  1336. Norcross, GA  30092
  1337. 404-840-0728
  1338. 404-840-0029 (fax)
  1339.  
  1340. ------------------------------------------------------------------------------
  1341.  
  1342. Subject: [18] I need specs and source for TIFF and CCITT group 4 Fax
  1343.  
  1344.  
  1345. Specs for Group 3 and 4 image coding (group 3 is very similar to group 4)
  1346. are in CCITT (1988) volume VII fascicle VII.3. They are recommendations
  1347. T.4 and T.6 respectively. There is also an updated spec contained in 1992
  1348. recommendations T.1 to T.6.
  1349.  
  1350. CCITT specs are available by anonymous ftp (see above answer on V.42bis).
  1351. The T.4 spec is in ccitt/1988/ascii/7_3_01.txt.Z, the T.6 spec
  1352. is in 7_3_02.txt.Z.
  1353.  
  1354. Source code can be obtained as part of a TIFF toolkit - TIFF image
  1355. compression techniques for binary images include CCITT T.4 and T.6:
  1356.  
  1357.     sgi.com:/graphics/tiff/v3.0beta.tar.Z     [192.48.153.1]
  1358.     Contact: sam@sgi.com
  1359.  
  1360. There is also a companion compressed tar file (v3.0pics.tar.Z) that
  1361. has sample TIFF image files. A draft of TIFF 6.0 is in TIFF6.ps.Z.
  1362. Concerning TIFF 6.0, Tom Lane <tgl+@cs.cmu.edu> adds:
  1363.  
  1364. The TIFF document won't do you much good unless you also have the official
  1365. JPEG standard.  That, you have to buy from ANSI or your national ISO member
  1366. organization (DIN over there, I suppose).
  1367.  
  1368. Worse, the TIFF 6.0 spec has a number of serious problems in its JPEG
  1369. features.  A clarification note will probably be needed to ensure that TIFF
  1370. JPEG files are compatible across different implementations.  I can't in good
  1371. faith recommend that anyone use TIFF-JPEG until these problems are resolved.
  1372.  
  1373.  
  1374. See also question 54 below.
  1375.  
  1376. ------------------------------------------------------------------------------
  1377.  
  1378. Subject: [19] What is JPEG?
  1379.  
  1380.  
  1381. JPEG (pronounced "jay-peg") is a standardized image compression mechanism.
  1382. JPEG stands for Joint Photographic Experts Group, the original name of the
  1383. committee that wrote the standard.  JPEG is designed for compressing either
  1384. full-color or gray-scale digital images of "natural" (real-world) scenes.
  1385. JPEG does not handle black-and-white (1-bit-per-pixel) images, nor does it
  1386. handle motion picture compression.  (Standards for compressing those types
  1387. of images are being worked on by other committees, named JBIG and MPEG
  1388. respectively.)
  1389.  
  1390. A good introduction to JPEG is posted regularly in news.answers by
  1391. Tom Lane <tgl+@cs.cmu.edu>. (See question 53 "Where are FAQ lists archived"
  1392. if this posting has expired at your site.)
  1393.  
  1394. See also the book "JPEG Still Image Data Compression Standard" by
  1395. William B. Pennebaker and Joan L. Mitchell. Published by Van Nostrand
  1396. Reinhold (phone 800/842-3636), ISBN 0-442-01272-1. 650 Pages, $59.95.
  1397. Review by Tom Lane: "This is by far the most complete exposition of
  1398. JPEG in existence.  It's written by two people who know what they are
  1399. talking about: both serve on the ISO JPEG standards committee.  If you
  1400. want to know how JPEG works or why it works that way, this is the book
  1401. to have."
  1402.  
  1403. ------------------------------------------------------------------------------
  1404.  
  1405. Subject: [20] I am looking for source of an H.261 codec.
  1406.  
  1407.  
  1408. The H.261 spec is available on src.doc.ic.ac.uk in
  1409. /doc/ccitt-standards/ccitt/1992/h/h261.doc.Z (or h261.rtf.Z)
  1410.  
  1411.  
  1412. from Thierry TURLETTI <turletti@sophia.inria.fr>:
  1413.  
  1414. We have implemented a software version of H.261 codec. 
  1415. It runs on top of UNIX and X-Windows. The coder uses the simple video capture
  1416. board "VideoPix" provided by SUN for the SparcStation. The output is directed
  1417. towards a standard TCP connection, instead of the leased lines or switched 
  1418. circuits for which regular H.261 codecs are designed. This enable us to test
  1419. video conferences over regular internet connections.
  1420. We have to polish it a bit, but the first release is now available by anonymous
  1421. ftp from avahi.inria.fr, in "/pub/h261.tar.Z".
  1422.  
  1423. ------------------------------------------------------------------------------
  1424.  
  1425. Subject: [25] Fast DCT (Discrete Cosine Transform) algorithms
  1426.  
  1427.  
  1428. Here are some references provided by Tom Lane <tgl+@cs.cmu.edu>:
  1429.  
  1430. Polynomial Transform Computation of the 2-D DCT, Duhamel & Guillemot,
  1431.   ICASSP '90 p. 1515.
  1432. A Forward-Mapping Realization of the Inverse DCT, McMillan & Westover,
  1433.   DCC '92 p. 219.
  1434. A Fast Algorithm for 2-D DCT, Cho, Yun & Lee, ICASSP '91 p. 2197.
  1435. Fast Algorithm and Implementation of 2-D DCT, Cho & Lee, Tr. CAS v38 p. 297.
  1436. A DCT Chip based on a new Structured and Computationally Efficient DCT
  1437.   Algorithm, Duhamel, Guillemot & Carlach, ICCAS '90 p. 77.
  1438. Trade-offs in the Computation of Mono- and Multi-dimensional DCTs,
  1439.   Vetterli, Duhamel & Guillemot, ICASSP '89 p. 999.
  1440. Practical Fast 1-D DCT Algorithms with 11 Multiplications,
  1441.   Loeffler, Ligtenberg & Moschytz, ICASSP '89 p. 988.
  1442. New Scaled DCT Algorithms for Fused Multiply/Add Architectures,
  1443.   Linzer & Feig, ICASSP '91 p. 2201.
  1444. Fast Algorithms for the 2-D Discrete Cosine Transform, Kamangar & Rao,
  1445.   IEEE Tr. Computers, v C-31 p. 899.
  1446. Fast 2-D Discrete Cosine Transform, Vetterli, ICASSP '85 p. 1538.
  1447. A Two-Dimensional Fast Cosine Transform, Haque, Tr. ASSP v ASSP-33 p. 1532.
  1448. Real-Time Parallel and Fully Pipelined 2-D DCT Lattice Structures with
  1449.   Application to HDTV Systems, Chiu & Liu, Tr. CAS for Video Tech, v 2 p. 25.
  1450.  
  1451. The Rao & Yip book cited in the jpeg v3 DCT code (see item 15 above) is a
  1452. good overall introduction, with an extensive (though now dated) bibliography.
  1453.  
  1454. ------------------------------------------------------------------------------
  1455.  
  1456. Subject: [26] Are there algorithms and standards for audio compression?
  1457.  
  1458.  
  1459. Yes. See the introduction to MPEG given in part 2 of this FAQ.
  1460.  
  1461. A lossless compressor for 8bit and 16bit audio data (.au) is available by
  1462. anonymous ftp at svr-ftp.eng.cam.ac.uk:/pub/misc/shorten-0.4.shar. It works
  1463. by using Huffman coding of prediction residuals.  Compression is generally
  1464. better than that obtained by applying general purpose compression utilities
  1465. to audio files.
  1466.  
  1467.  
  1468. Copied from the comp.dsp FAQ posted by guido@cwi.nl (Guido van Rossum):
  1469.  
  1470. Strange though it seems, audio data is remarkably hard to compress
  1471. effectively.  For 8-bit data, a Huffman encoding of the deltas between
  1472. successive samples is relatively successful.  For 16-bit data,
  1473. companies like Sony and Philips have spent millions to develop
  1474. proprietary schemes.
  1475.  
  1476. Public standards for voice compression are slowly gaining popularity,
  1477. e.g. CCITT G.721 and G.723 (ADPCM at 32 and 24 kbits/sec).  (ADPCM ==
  1478. Adaptive Delta Pulse Code Modulation.)  Free source code for a *fast*
  1479. 32 kbits/sec ADPCM (lossy) algorithm is available by ftp from ftp.cwi.nl
  1480. as /pub/adpcm.shar.
  1481.  
  1482. (Note that U-LAW and silence detection can also be considered
  1483. compression schemes.)
  1484.  
  1485.  
  1486. See also the comp.dsp FAQ for more information on:
  1487.  
  1488. - The U.S. DoD's Federal-Standard-1016 based 4800 bps code excited linear
  1489.   prediction voice coder version 3.2 (CELP 3.2)
  1490. - The U.S. DoD's Federal-Standard-1015/NATO-STANAG-4198 based 2400 bps
  1491.   linear prediction coder version 53 (LPC-10e v53)
  1492. - Realtime DSP code and hardware for FS-1015 and FS-1016
  1493.  
  1494. You can find the comp.dsp FAQ in comp.dsp or news.answers with subject:
  1495. "FAQ: Audio File Formats" or by ftp on pit-manager.mit.edu
  1496. in /pub/usenet/news.answers/audio-fmts/part1.
  1497.  
  1498.  
  1499. from Markus Kuhn <mskuhn@immd4.informatik.uni-erlangen.de>:
  1500.  
  1501. One highest quality sound compression format is called ASPEC and has
  1502. been developped by a team at the Frauenhofer Institut in Erlangen (Germany)
  1503. and others.
  1504.  
  1505. ASPEC produces CD like quality and offers several bitrates, one is
  1506. 128 kbit/s. It is a lossy algorithm that throws away frequencys that
  1507. aren't registered in the human cochlea in addition to sophisticated
  1508. entropy coding. The 64 kbit/s ASPEC variant might soon bring hifi
  1509. quality ISDN phone connections. It has been implemented on standard DSPs.
  1510.  
  1511. The Layer 3 MPEG audio compression standard now contains what is officially
  1512. called the best parts of the ASPEC and MUSICAM algorithms. A reference is:
  1513.  
  1514.   K.Brandenburg, G.Stoll, Y.F.Dehery, J.D.Johnston, L.v.d.Kerkhof,
  1515.   E.F.Schroeder: "The ISO/MPEG-Audio Codec: A Generic Standard for Coding
  1516.   of High Quality Digital Audio",
  1517.   92nd. AES-convention, Vienna 1992, preprint 3336
  1518.  
  1519. ------------------------------------------------------------------------------
  1520.  
  1521. Subject: [30] My archive is corrupted!
  1522.  
  1523.  
  1524. The two most common reasons for this are
  1525.  
  1526. (1) failing to use the magic word "tenex" (when connected to SIMTEL20 and
  1527.     other TOPS20 systems) or "binary" (when connected to UNIX systems) when
  1528.     transferring the file from an ftp site to your host machine.  The
  1529.     reasons for this are technical and boring.  A synonym for "tenex" is
  1530.     "type L 8", in case your ftp doesn't know what "tenex" means.
  1531.  
  1532. (2) failing to use an eight-bit binary transfer protocol when transferring
  1533.     the file from the host to your PC.  Make sure to set the transfer type
  1534.     to "binary" on both your host machine and your PC.
  1535.  
  1536. ------------------------------------------------------------------------------
  1537.  
  1538. Subject: [31] pkunzip reports a CRC error!
  1539.  
  1540.  
  1541. The portable zip 1.0 contains many workarounds for undocumented restrictions
  1542. in pkunzip. Compatibility is ensured for pkunzip 1.10 only. All previous
  1543. versions (pkunzip 1.0x) have too many bugs and cannot be supported. This
  1544. includes Borland unzip.
  1545.  
  1546. So if your pkunzip reports a CRC error, check that you are not using
  1547. an obsolete version. Get either pkzip 1.10 or unzip 5.0 (see question
  1548. 2 above for ftp sites).
  1549.  
  1550. Immediately after zip 1.0 was released, a new undocumented feature
  1551. of pkunzip was discovered, which causes CRC errors even with pkunzip 1.10
  1552. on rare occasions. A patch is available on valeria.cs.ucla.edu in
  1553. /pub/zip10.patch.
  1554.  
  1555. ------------------------------------------------------------------------------
  1556.  
  1557. Subject: [32] VMS zip is not compatible with pkzip!
  1558.  
  1559.  
  1560. The problem is most likely in the file transfer program.
  1561.  
  1562. Many use kermit to transfer zipped files between PC and VMS VAX.  The
  1563. following VMS kermit settings make VMS-ZIP compatible with PKZIP:
  1564.  
  1565.                                              VMS kermit        PC kermit
  1566.                                            ---------------   --------------
  1567.  
  1568. Uploading PKZIPped file to be UNZIPped:    set fi ty fixed    set fi ty bi
  1569. Downloading ZIPped file to be PKUNZIPped:  set fi ty block    set fi ty bi
  1570.  
  1571. If you are not using kermit, transfer a file created by pkzip on MSDOS
  1572. to VMS, transfer it back to your PC and check that pkunzip can extract it.
  1573.  
  1574. ------------------------------------------------------------------------------
  1575.  
  1576. Subject: [50] What is this 'tar' compression program?
  1577.  
  1578.  
  1579. tar is not a compression program. It just combines several files
  1580. into one, without compressing them. tar file are often compressed with
  1581. 'compress', resulting in a .tar.Z file. See question 2, file type .tar.Z.
  1582. GNU tar has the capability to (de)compress files as well.
  1583.  
  1584. When you have to archive a lot of very small files, it is often
  1585. preferable to create a single .tar file and compress it, than to
  1586. compress the individual files separately. The compression program can
  1587. thus take advantage of redundancy between separate files.  The
  1588. disadvantage is that you must uncompress the whole .tar file to
  1589. extract any member.
  1590.  
  1591. ------------------------------------------------------------------------------
  1592.  
  1593. Subject: [51] I need a CRC algorithm
  1594.  
  1595.  
  1596. As its name implies (Cyclic Redundancy Check) a crc adds redundancy
  1597. whereas the topic of this group is to remove it. But since this
  1598. question comes up often, here is some code (by Rob Warnock <rpw3@sgi.com>).
  1599.  
  1600. The following C code does CRC-32 in BigEndian/BigEndian byte/bit order.
  1601. That is, the data is sent most significant byte first, and each of the bits
  1602. within a byte is sent most significant bit first, as in FDDI. You will need
  1603. to twiddle with it to do Ethernet CRC, i.e., BigEndian/LittleEndian byte/bit
  1604. order. [Left as an exercise for the reader.]
  1605.  
  1606. The CRCs this code generates agree with the vendor-supplied Verilog models
  1607. of several of the popular FDDI "MAC" chips.
  1608.  
  1609. u_long crc32_table[256];
  1610. /* Initialized first time "crc32()" is called. If you prefer, you can
  1611.  * statically initialize it at compile time. [Another exercise.]
  1612.  */
  1613.  
  1614. u_long crc32(u_char *buf, int len)
  1615. {
  1616.         u_char *p;
  1617.         u_long  crc;
  1618.  
  1619.         if (!crc32_table[1])    /* if not already done, */
  1620.                 init_crc32();   /* build table */
  1621.         crc = 0xffffffff;       /* preload shift register, per CRC-32 spec */
  1622.         for (p = buf; len > 0; ++p, --len)
  1623.                 crc = (crc << 8) ^ crc32_table[(crc >> 24) ^ *p];
  1624.         return ~crc;            /* transmit complement, per CRC-32 spec */
  1625. }
  1626.  
  1627. /*
  1628.  * Build auxiliary table for parallel byte-at-a-time CRC-32.
  1629.  */
  1630. #define CRC32_POLY 0x04c11db7     /* AUTODIN II, Ethernet, & FDDI */
  1631.  
  1632. init_crc32()
  1633. {
  1634.         int i, j;
  1635.         u_long c;
  1636.  
  1637.         for (i = 0; i < 256; ++i) {
  1638.                 for (c = i << 24, j = 8; j > 0; --j)
  1639.                         c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
  1640.                 crc32_table[i] = c;
  1641.         }
  1642. }
  1643.  
  1644. ------------------------------------------------------------------------------
  1645.  
  1646. Subject: [52] What about those people who continue to ask frequently asked
  1647.               questions in spite of the frequently asked questions document?
  1648.  
  1649.  
  1650. Just send them a polite mail message, referring them to this document.
  1651. There is no need to flame them on comp.compression.  That would just
  1652. add more noise to this group.  Posted answers that are in the FAQ are
  1653. just as annoying as posted questions that are in the FAQ.
  1654.  
  1655. ------------------------------------------------------------------------------
  1656.  
  1657. Subject: [53] Where are FAQ lists archived?
  1658.  
  1659.  
  1660. Many are crossposted to news.answers.  That newsgroup should have a
  1661. long expiry time at your site; if not, talk to your sysadmin.
  1662.  
  1663. FAQ lists are available by anonymous FTP from rtfm.mit.edu (18.72.1.58).
  1664. The comp.compression FAQ that you are reading is in directory
  1665.    /pub/usenet/news.answers/compression-faq
  1666.  
  1667. If you don't have FTP access, you can access the archives by mail
  1668. server.  Send an email message to mail-server@pit-manager.mit.edu
  1669. containing the commands
  1670.     send usenet/news.answers/compression-faq/part1
  1671.     send usenet/news.answers/compression-faq/part2
  1672. For instructions, send an email message to the same address with the
  1673. words "help" and "index" (no quotes) on separate lines. If you don't
  1674. get a reply, check your return address, or add a line such as
  1675.     path myname@foo.edu
  1676.  
  1677. ------------------------------------------------------------------------------
  1678.  
  1679. Subject: [54] I need specs for graphics formats
  1680.  
  1681.  
  1682. Have a look in directory /pub/graphics.formats on zamenhof.cs.rice.edu.
  1683. It contains descriptions of gif, tiff, fits, etc...
  1684.  
  1685. See also the FAQ list for comp.graphics.
  1686.  
  1687. ------------------------------------------------------------------------------
  1688.  
  1689. Subject: [55] Where can I find Lenna and other images?
  1690.  
  1691.  
  1692. A bunch of standard images (lenna, baboon, cameraman, crowd, moon
  1693. etc..) are on ftp site eedsp.gatech.edu (130.207.226.2) in directory
  1694. /database/images. The images are in 256-level grayshades (256x256
  1695. pixels, 256 "colors").
  1696.  
  1697. The site ftp.ipl.rpi.edu also has standard images, in two directories:
  1698.    ftp.ipl.rpi.edu:/pub/image/still/usc 
  1699.    ftp.ipl.rpi.edu:/pub/image/still/canon
  1700.  
  1701. In each of those directories are the following directories:
  1702.    bgr     - 24 bit blue, green, red
  1703.    color   - 24 bit red, green, blue
  1704.    gray    - 8 bit grayscale uniform weighted
  1705.    gray601 - 8 bit grayscale CCIR-601 weighted
  1706.  
  1707. And in these directories are the actual images.  
  1708.  
  1709. For example, the popular lena image is in
  1710.    ftp.ipl.rpi.edu:/pub/image/still/usc/color/lena  # 24 bit RGB
  1711.    ftp.ipl.rpi.edu:/pub/image/still/usc/bgr/lena    # 24 bit BGR
  1712.    ftp.ipl.rpi.edu:/pub/image/still/usc/gray/lena   # 8 bit gray
  1713.  
  1714. All of the images are in Sun rasterfile format.  You can use the pbm
  1715. utilities to convert them to whatever format is most convenient.
  1716. [pbm is available in ftp.ee.lbl.gov:/pbmplus*.tar.Z].
  1717. Questions about the ipl archive should be sent to rodney@ipl.rpi.edu.
  1718.  
  1719. The archive maintainer at ftp.ipl.rpi.edu is interested in some method
  1720. of establishing a canonical ftp database of images and could volunteer
  1721. the ipl to be an ftp site for that database. Send suggestions to
  1722. rodney@ipl.rpi.edu.
  1723.  
  1724.  
  1725. Beware: the same image often comes in many different forms, at
  1726. different resolutions, etc... The original lenna image is 512 wide,
  1727. 512 high, 8 bits per pel, red, green and blue fields.  Gray-scale
  1728. versions of Lenna have been obtained in two different ways from the
  1729. original:
  1730.  (1) Using the green field as a gray-scale image, and
  1731.  (2) Doing an RGB->YUV transformation and saving the Y component.
  1732. Method (1) makes it easier to compare different people's results since
  1733. everyone's version should be the same using that method.  Method (2)
  1734. produces a more correct image.
  1735.  
  1736. For the curious: 'lena' or 'lenna' is a digitized Playboy centerfold,
  1737. from November 1972. (Lenna is the spelling in Playboy, Lena is the
  1738. Swedish spelling of the name.) Lena Soderberg (ne Sjooblom) was last
  1739. reported living in her native Sweden, happily married with three kids
  1740. and a job with the state liquor monopoly.  In 1988, she was
  1741. interviewed by some Swedish computer related publication, and she was
  1742. pleasantly amused by what had happened to her picture.  That was the
  1743. first she knew of the use of that picture in the computer business.
  1744.  
  1745. The editorial in the January 1992 issue of Optical Engineering (v. 31
  1746. no. 1) details how Playboy has finally caught on to the fact that
  1747. their copyright on Lenna Sjooblom's photo is being widely infringed.
  1748. It sounds as if you will have to get permission from Playboy to
  1749. publish it in the future.
  1750.  
  1751.  
  1752. Note on the CCITT test images, by Robert Estes <estes@eecs.ucdavis.edu>:
  1753.  
  1754. The ccitt files are in ftp.ipl.rpi.edu:/image-archive/bitmap/ccitt.
  1755. They are named ccitt-n.ras.Z where n goes from 1 to 8.  Each file has
  1756. an accompanying doc file called ccitt-n.ras.doc which describes the image
  1757. file. Here's the doc file for ccitt-1.ras:
  1758.  
  1759. Name ccitt-1.ras
  1760. Size 1728 x 2376 x 1
  1761. Type 1 bit standard format sun rasterfile 
  1762. Keywords binary standard image 1 bit fax
  1763. Description
  1764. One of eight images from the standard binary CCITT test image set.
  1765.  
  1766. This set is commonly used to compare binary image compression
  1767. techniques. The images are are 1728x2376 pixels.
  1768.  
  1769. ------------------------------------------------------------------------------
  1770.  
  1771. Subject: [56] I am looking for a message digest algorithm
  1772.  
  1773.  
  1774. Look on the ftp site rsa.com, in directory /pub. MD4 and MD5 are there.
  1775. This question would be more appropriate on sci.crypt.
  1776.  
  1777.  
  1778.  
  1779.           End of part 1 of the comp.compression faq.
  1780.